package com.neuedu.his.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neuedu.his.entity.Invoice;
import com.neuedu.his.service.InvoiceService;

@RestController
@RequestMapping("/invoice")
public class InvoiceController {

	@Autowired
	private InvoiceService service;
	
	@RequestMapping("/selectAll")
//  http://localhost:8088/invoice/selectAll?registid=35
	public List<Invoice> selectAll(Invoice u){
		return service.selectAll(u);
	}
	
	@RequestMapping("/add")
//  http://localhost:8088/invoice/add?invoicenum=1&money=1&state=1&creationtime=2021-01-01 09:00:00&userid=1&registid=1&feetype=1&back=1&dailystate=1
	public int add(Invoice u){
		return service.add(u);
	}
	
	@RequestMapping("/delete")
//  http://localhost:8088/invoice/delete?id=146
	public int delete(Invoice u){
		return service.delete(u);
	}
}
